cmake_minimum_required(VERSION 3.5)

project(demoOpen62541)

set (EXECUTABLE_OUTPUT_PATH  ${PROJECT_SOURCE_DIR}/bin)

add_definitions(-std=c99)

include_directories(${PROJECT_SOURCE_DIR}/open62541)
include_directories(${PROJECT_SOURCE_DIR}/src)

link_directories(${PROJECT_SOURCE_DIR}/open62541)

add_executable(server_lds ${PROJECT_SOURCE_DIR}/src/server_lds.c)
target_link_libraries(server_lds libopen62541.a)

add_executable(server_register ${PROJECT_SOURCE_DIR}/src/server_register.c)
target_link_libraries(server_register libopen62541.a)

add_executable(client_find_servers ${PROJECT_SOURCE_DIR}/src/client_find_servers.c)
target_link_libraries(client_find_servers libopen62541.a)

add_executable(server_multicast ${PROJECT_SOURCE_DIR}/src/server_multicast.c)
target_link_libraries(server_multicast libopen62541.a)